package com.ds.service.cdkService;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.ds.mapper.UserCdkMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author wzy
 * @version 1.0
 * @date 2022/6/17 21:48
 */

@Service
@DS("db3")
public class UserCdkServiceImpl implements UserCdkService {


    @Autowired
    private UserCdkMapper userCdkMapper;

    @Override
    public List<Map> getUserCdk(String uid) {
        return userCdkMapper.getUserCdk(uid);
    }

    @Override
    @Transactional
    public Integer insertUserCdk(String cdk,String cTitle,String reward){
        return userCdkMapper.insertUserCdk(cdk,cTitle,reward);
    }
}
